I have been searching for the method for controlling the global sound in as. I saw on the Internet that someone said it was the soundmixer class, but I tried the following method and it turned out to be invalid.
1 If (value)2 soundmixer. soundtransform. volume = 1;3 else4 soundmixer. soundtransform. volume = 0;56
I checked a lot of information and found that th
class description:
Especially when it is marked with a red line, it tells us to control the externally loaded SWF file and use the soundmixer class attribute. OK. After looking at the soundmixer class, we found it very simple. This class provides a static method stopall to stop the currently playing sound. Take a look:
Okay, modify the class (http://blog.csdn.net/li_007/archive/2009/03/28/4032276.aspx) t
Video Recording: Code In fact, there is nothing. The most important thing is the front-end flex code. Of course, there are still some configuration problems. I believe my friends who have done red5 simple demo should know that I will not go into detail here. 2.
Article The note is the recording of the audio. The screen is dropped because there is no microphone on the local machine. If you want to add some features, just remove the comments. 3. The following figure shows the front-end player. t
If you play back the file while loading the audio file or video file data, it is considered as stream transmission. NormallyStream Transmission of external sound files loaded from the remote server, so that users do not have to wait until all sound data is loaded.Listen to the voice.The soundmixer. buffertime attribute indicates how long the Flash Player should collect before it allows playing the sound.Audio Data (in milliseconds ). That is to say, i
Actionscript 3.0 provides a new feature that uses ByteArray, Soundmixer.
The code is as follows:
function func (a:number) {
Return num * Math.sin (a);
}
function Drawfunction (func:function, Thickness:number, Color:number) {
Graphics.linestyle (thickness, color, 100);
Graphics.moveto (STAGE.STAGEHEIGHT/2-func) ((+ t)/20) * 20);
for (var i = i var fi = Stage.stageheight/2-func ((i + t++)/20) * 20;
Graphics.lineto (i, FI);
}
}
function Spectrum (event:e
information is retrieved from the MusicControl class.
SoundMixer. computeSpectrum (_ spectrumArray, true );
The second parameter "true" indicates that the spectrum is extracted, and "false" indicates that the waveform is obtained.
/*
Class function: displays the spectrum.
*/
Package net. cdipan. spectrum {
Import flash. display. Sprite;
Import flash. utils. ByteArray;
Import flash. text. TextField;
Import flash. events. MouseEvent;
Imp
Package
Flash. Media
Class
Public class sound
Inheritance
Sound-> eventdispatcher-> Object
Language version:
Event 3.0
Player version:
Flash Player 9
Sound class allows you to use sound in applications. You can use the sound class to create a new sound object, load an external MP3 file to the object, play the file, close the sound stream, and access the audio-related data, for example, information about the number of bytes i
waveforms, and 256-512 are right-channel waveforms. If pixels are exceeded, the waveforms start from the beginning.The implementation principle is mainly to use soundmixer. computespectrum in as3, and then draw a Curve Based on the stage size.The disadvantage is that it does not support WAV. I tried to use a flash player WAV library, but the memory overhead is too large. If you need to play wav, you can use FFMPEG to convert it to MP3.SWFSimple inter
both A and B are negativeY = a + B-(A * B/(-(2 POW (n-1)-1 )))ElseY = a + B-(A * B/(2 POW (n-1 ))Step 3.Add the header to the resultant (mixed) data and play back.If some thing is unclear and ambigious let me know.RegardsRanjeet Gupta.There is also a simple C Program Schematic Code But it includes the core Algorithm :# Include # Include # Include # Include Int main (INT argc, char * argv []) {Char mixname [255];File * pcm1, * pcm2, * mix;Char sample1, sample2;Int value;Pcm1 = fopen (argv [1], "
Contact Us
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.